From e0815e990dc4450f708893f09eee3711f44e7986 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Wed, 23 Nov 2016 20:45:43 +0100 Subject: [PATCH] babl-cache: use clearer arithmetic for dropping 1% of cached fishes --- babl/babl-cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/babl/babl-cache.c b/babl/babl-cache.c index 8d5ed61..005fda2 100644 --- a/babl/babl-cache.c +++ b/babl/babl-cache.c @@ -237,8 +237,7 @@ void babl_init_db (void) case '-': /* finalize */ if (babl) { - if ( ((babl->fish.pixels+1 + babl->fish.processings) % - ((tim % 100)+1)) == 0) + if (((babl->fish.pixels + babl->fish.processings) % 100) == (tim % 100)) { /* 1% chance of individual cached conversions being dropped - * making sure mis-measured conversions do not -- 2.30.2